package sseGameApps.model.mdkbr;

import java.io.Serializable;

import com.google.appengine.api.datastore.Key;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;

@Model(schemaVersion = 1)
public class MdKanji implements Serializable {

    private static final long serialVersionUID = 1L;

    @Attribute(primaryKey = true)
    private Key key;

    @Attribute(version = true)
    private Long version;

    private Integer mojiNo;

    private String mojiText;

    @Attribute(unindexed = true)
    private String rubiText;

    @Attribute(unindexed = true)
    private String descText;

    private Integer barPoint;

    private Integer attackPoint;

    private String kanjiType;

    @Attribute(unindexed = true)
    private String kanjiTypeText;

    private String firstSummonUser;

    @Attribute(unindexed = true)
    private Integer summonCount;

    private Integer level;

    /**
     * Returns the key.
     *
     * @return the key
     */
    public Key getKey() {
        return key;
    }

    /**
     * Sets the key.
     *
     * @param key
     *            the key
     */
    public void setKey(Key key) {
        this.key = key;
    }

    /**
     * Returns the version.
     *
     * @return the version
     */
    public Long getVersion() {
        return version;
    }

    /**
     * Sets the version.
     *
     * @param version
     *            the version
     */
    public void setVersion(Long version) {
        this.version = version;
    }

    public Integer getMojiNo() {
        return mojiNo;
    }

    public void setMojiNo(Integer mojiNo) {
        this.mojiNo = mojiNo;
    }

    public String getMojiText() {
        return mojiText;
    }

    public void setMojiText(String mojiText) {
        this.mojiText = mojiText;
    }

    public String getRubiText() {
        return rubiText;
    }

    public void setRubiText(String rubiText) {
        this.rubiText = rubiText;
    }

    public String getDescText() {
        return descText;
    }

    public void setDescText(String descText) {
        this.descText = descText;
    }

    public Integer getBarPoint() {
        return barPoint;
    }

    public void setBarPoint(Integer barPoint) {
        this.barPoint = barPoint;
    }

    public Integer getAttackPoint() {
        return attackPoint;
    }

    public void setAttackPoint(Integer attackPoint) {
        this.attackPoint = attackPoint;
    }

    public String getKanjiType() {
        return kanjiType;
    }

    public void setKanjiType(String specialForm) {
        this.kanjiType = specialForm;
    }

    public String getKanjiTypeText() {
        return kanjiTypeText;
    }

    public void setKanjiTypeText(String kanjiTypeText) {
        this.kanjiTypeText = kanjiTypeText;
    }

    public String getFirstSummonUser() {
        return firstSummonUser;
    }

    public void setFirstSummonUser(String firstSummonUser) {
        this.firstSummonUser = firstSummonUser;
    }

    public Integer getSummonCount() {
        return summonCount;
    }

    public void setSummonCount(Integer summonCount) {
        this.summonCount = summonCount;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((key == null) ? 0 : key.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        MdKanji other = (MdKanji) obj;
        if (key == null) {
            if (other.key != null) {
                return false;
            }
        } else if (!key.equals(other.key)) {
            return false;
        }
        return true;
    }
}
